 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <!DOCTYPE c:import PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

  <script type="text/javascript">

function adicionar(idhabilitacao){
	document.getElementById('table-login').idhabilitacao.value=idhabilitacao;
	document.getElementById('table-login').classe.value='ItemControl';
	document.getElementById('table-login').acao.value='lancar';	
	document.getElementById('table-login').submit();
}

function remover(idhabilitacao){
	document.getElementById('table-login').idhabilitacao.value=idhabilitacao;
	document.getElementById('table-login').classe.value='ItemControl';
	document.getElementById('table-login').acao.value='remover';	
	document.getElementById('table-login').submit();
}
function removerTudo(){
	document.getElementById('table-login').classe.value='ItemControl';
	document.getElementById('table-login').acao.value='removerTudo';	
	document.getElementById('table-login').submit();
}


</script>
		<c:import url="popupmenu.jsp"></c:import>


		<!-- conteudo popup -->
		<div class="popup">
		

		
		
		
		
	 <form action="/sga/Servlet" method="post" id="table-login" style="text-align: center;padding-top: 15px;">
 <input type="hidden" name="classe" value="HabilitacaoControl"/>
 <input type="hidden" name="acao" value="pesquisar"/>
<!--  <input type="hidden" name="acao" value="HabilitacaoControl.pesquisar"/> -->
 <input type="hidden" name="idhabilitacao"/>
 <input type="hidden" name="idusuario" value="${session_usuario.id }"/>
 <input type="hidden" name="destino" value="/html/consulta/popupitem.jsp"/>
 
 
 
 
 
  
 		<table class="table-lista" border="0" align="center">
		<tr  class="tr1">
		<td colspan="3">Lista </td>
		<td>
		<c:if test="${items_session!=null }">
		<a href="javascript:removerTudo();"><img src="/sga/img/excluir.png"/></a>
		</c:if>
		</td>
		</tr>
		
<c:if test="${items_session==null }">
<tr  class="tr2">
<td><input type="text" class="edit" style="visibility: hidden;" size="10"></input></td>
<td><input type="text" class="edit" style="visibility: hidden;" size="1"></input></td>
<td><input type="text" class="edit" style="visibility: hidden;" size="1"></input></td>
<td><input type="text" class="edit" style="visibility: hidden;" size="1"></input></td> 
</tr>
</c:if>






<c:if test="${items_session!=null }">


<c:forEach var="items_session" items="${items_session}" varStatus="cont">
<c:if test="${cont.count % 2==0}">
<tr  class="tr2"> 
</c:if>
<c:if test="${cont.count % 2!=0}">
<tr  class="tr3">
</c:if>
<td>${items_session.quantidade }+</td>
<td>${items_session.habilitacao.servico.descricao }</input></td>
<td>${items_session.habilitacao.servico.preco}</td>
<td><a href="javascript:remover(${items_session.habilitacao.id });"><img src="/sga/img/excluir.png"/></a></td>

</tr>
</c:forEach>
</c:if>

</table>
 
 
 
 
 
 
 
 
 
 <fieldset><legend>Busca</legend>
  <table align="center">
 	<tr>
 		<td>Nome:
 				  <input type="text" style="margin-left: 5px;" name="descricao" id="descricao" class="edit" ></input>
 		</td>
 	</tr>
  	<tr>
 		<td>
 			<input type="submit" value="Pesquisar" class="botao-pesquisar" onclick="document.getElementById('paginaAtual').value=1"/>
 			 	
 			
 			<input type="button" value="Limpar" class="botao-limpar" onclick="apagaTextoById('descricao');apagaTextoById('idhabilitacao');"/>
 		</td>
 	</tr>
 </table>
 
 
 
 
 
 
 
 <c:if test="${habilitacaos!=null }">
 
<table class="table-lista" border="0" align="center">
<tr class="tr1">

<td>C&oacute;digo<td>Nome</td><td>Pre&ccedil;o</td>
</tr>

<c:forEach var="habilitacaos" items="${habilitacaos}" varStatus="cont">
<c:if test="${cont.count % 2==0}">
<tr  class="tr2"> 
</c:if>
<c:if test="${ cont.count % 2!=0}">
<tr  class="tr3">
</c:if>
<td>
	${habilitacaos.servico.id }
</td>
<td><a href="javascript:adicionar(${habilitacaos.id });">
	${habilitacaos.servico.descricao }</a>
</td>
<td>${habilitacaos.servico.preco }
</td>

</tr>
</c:forEach>
</table>


<c:import url="/html/paginacao.jsp"  >
<c:param name="count" value="${count}"/>
<c:param name="paginaAtual" value="${paginaAtual}"/>
</c:import>


 </c:if>
</fieldset>
 
</form>
	
	
	
		
		
		
		
		
</div>

<c:import url="popuprodape.jsp"></c:import>

	

